const initState = ''
const login = (state = initState, action) => {
  if (action.type === 'login/login') {
    return action.payload
  }
  if (action.type === 'login/logout') {
    return ''
  }
  return state
}

export default login
